From e3e536a9e0335b724ec2fafba67c7f576a8b5241 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 6 Apr 2006 01:55:30 +0000 Subject: [PATCH] Warn for unknown options passed to filters, too. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@1825 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/filter_vecs.c | 7 ++++++- gpsbabel/vecs.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gpsbabel/filter_vecs.c b/gpsbabel/filter_vecs.c index 6924d9085..51dd19244 100644 --- a/gpsbabel/filter_vecs.c +++ b/gpsbabel/filter_vecs.c @@ -1,7 +1,7 @@ /* Describe vectors containing filter operations. - Copyright (C) 2002,2004,2005 Robert Lipe, robertlipe@usa.net + Copyright (C) 2002,2004,2005,2006 Robert Lipe, robertlipe@usa.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -123,6 +123,7 @@ find_filter_vec(char *const vecname, char **opts) fl_vecs_t *vec = filter_vec_list; char *v = xstrdup(vecname); char *svecname = strtok(v, ","); + int found = 0; while (vec->vec) { arglist_t *ap; @@ -156,12 +157,16 @@ find_filter_vec(char *const vecname, char **opts) opt = get_option(*opts, ap->argstring); if ( opt ) { + found = 1; assign_option(vec->name, ap, opt); xfree(opt); } } } } + if (opts && opts[0] && !found) { + warning("'%s' is an unknown option to %s.\n", *opts, vec->name); + } if (global_opts.debug_level >= 1) disp_vec_options(vec->name, vec->vec->args); diff --git a/gpsbabel/vecs.c b/gpsbabel/vecs.c index b0e3d26aa..207679709 100644 --- a/gpsbabel/vecs.c +++ b/gpsbabel/vecs.c @@ -1,7 +1,7 @@ /* Describe vectors containing file operations. - Copyright (C) 2002, 2004, 2005 Robert Lipe, robertlipe@usa.net + Copyright (C) 2002, 2004, 2005, 2006 Robert Lipe, robertlipe@usa.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -- 2.30.2